package com.example.springioc2.controller;

import com.example.springioc2.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
    //注入方法1：属性注入
//    @Autowired
    private UserService userService;
    public void sayHi() {
        userService.doService();
        System.out.println("hi, UserController");
    }
}
